home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / hardware / cirboost / cirboost.asm < prev    next >
Assembly Source File  |  1995-05-06  |  8KB  |  240 lines

  1. ;------------------------------------------------------------------------------
  2. ; A little tool coded by -= Type One =- to boost his CL-GD5424 VLB
  3. ;
  4. ; I've done some test with vidspeed on my 486 DX 40 VLB :
  5. ;
  6. ; 8  bits write : 126 frames/s  in mode 13h 320x200x256 chained
  7. ; 16 bits write : 234 frames/s
  8. ; 32 bits write : 241 frames/s
  9. ;
  10. ; 8  bits write : 121 frames/s  in mode X 320x200x256 tweaked
  11. ; 16 bits write : 216 frames/s
  12. ; 32 bits write : 234 frames/s
  13. ;
  14. ; 8  bits write : 29 frames/s   in VESA 101h 640x480x256 chained
  15. ; 16 bits write : 49 frames/s
  16. ; 32 bits write : 50 frames/s  
  17. ;
  18. ; Quite cool with a Cirrus 16 bits, no ??????
  19. ;
  20. ; Everything should work correctly .... I've just had some problems running
  21. ; Dope/Complex (you just have to remove cirboost by typing "cirboost.com")
  22. ;
  23. ; Assemble it with ml /AT to get a COM file !!!!
  24. ;
  25. ; (C) TFL-TDV 1995
  26. ;------------------------------------------------------------------------------
  27.  
  28.  
  29. .286
  30. Print              MACRO Symbol
  31.                    MOV AH,09h
  32.                    MOV DX,OFFSET Symbol
  33.                    INT 21h
  34. ENDM
  35.  
  36. Int10              SEGMENT
  37.                    ORG 100h
  38.                    ASSUME CS:Int10
  39. Start:             JMP Installation
  40.  
  41. Save10             LABEL DWORD
  42. Int10Ofs           WORD ?
  43. Int10Seg           WORD ?
  44. IDString           DB "B!" ; a little string to recognize myself ;-)
  45.  
  46. NewInt10           PROC FAR
  47.  
  48. ; Boost standard GFX modes
  49.  
  50.                    CMP  AX,13h  ;320x200x256
  51.                    JE   Boost
  52.                    CMP  AX,0Dh  ;320x200x16
  53.                    JE   Boost
  54.                    CMP  AX,0Eh  ;640x200x16
  55.                    JE   Boost
  56.                    CMP  AX,0Fh  ;640x350x16
  57.                    JE   Boost
  58.                    CMP  AX,12h  ;640x480x16
  59.                    JE   Boost
  60.  
  61.                    CMP  AX,4F02h
  62.                    JE   VesaTest
  63.  
  64.                    JMP  LetsGo
  65.  
  66. ; Boost VESA modes (even SciTech's ones !)
  67.  
  68. VesaTest:          CMP  BX,150h ;640x350x16
  69.                    JE   Boost
  70.                    CMP  BX,151h ;640x400x16
  71.                    JE   Boost
  72.                    CMP  BX,152h ;640x480x16
  73.                    JE   Boost
  74.                    CMP  BX,153h ;320x200x256
  75.                    JE   Boost
  76.                    CMP  BX,156h ;360x200x256
  77.                    JE   Boost
  78.                    CMP  BX,154h ;320x240x256
  79.                    JE   Boost
  80.                    CMP  BX,157h ;360x240x256
  81.                    JE   Boost
  82.                    CMP  BX,155h ;320x400x256
  83.                    JE   Boost
  84.                    CMP  BX,158h ;360x400x256
  85.                    JE   Boost
  86.                    CMP  BX,102h ;800x600x16
  87.                    JE   Boost
  88.                    CMP  BX,104h ;1024x768x16
  89.                    JE   Boost
  90.                    CMP  BX,106h ;1280x1024x16
  91.                    JE   Boost
  92.                    CMP  BX,11ch ;640x350x256
  93.                    JE   Boost
  94.                    CMP  BX,100h ;640x400x256
  95.                    JE   Boost
  96.                    CMP  BX,101h ;640x480x256
  97.                    JE   Boost
  98.                    CMP  BX,103h ;800x600x256
  99.                    JE   Boost
  100.                    CMP  BX,105h ;1024x768x256
  101.                    JE   Boost
  102.                    CMP  BX,10dh ;320x200x32k
  103.                    JE   Boost
  104.                    CMP  BX,12fh ;360x200x32k
  105.                    JE   Boost
  106.                    CMP  BX,12dh ;320x240x32k
  107.                    JE   Boost
  108.                    CMP  BX,130h ;360x240x32k
  109.                    JE   Boost
  110.                    CMP  BX,12eh ;320x400x32k
  111.                    JE   Boost
  112.                    CMP  BX,131h ;360x400x32k
  113.                    JE   Boost
  114.                    CMP  BX,11dh ;640x350x32k
  115.                    JE   Boost
  116.                    CMP  BX,11eh ;640x400x32k
  117.                    JE   Boost
  118.                    CMP  BX,110h ;640x480x32k
  119.                    JE   Boost
  120.                    CMP  BX,113h ;800x600x32k
  121.                    JE   Boost
  122.                    CMP  BX,10eh ;320x200x64k
  123.                    JE   Boost
  124.                    CMP  BX,134h ;360x200x64k
  125.                    JE   Boost
  126.                    CMP  BX,132h ;320x240x64k
  127.                    JE   Boost
  128.                    CMP  BX,135h ;360x240x64k
  129.                    JE   Boost
  130.                    CMP  BX,133h ;320x400x64k
  131.                    JE   Boost
  132.                    CMP  BX,136h ;360x400x64k
  133.                    JE   Boost
  134.                    CMP  BX,11fh ;640x350x64k
  135.                    JE   Boost
  136.                    CMP  BX,120h ;640x400x64k
  137.                    JE   Boost
  138.                    CMP  BX,111h ;640x480x64k
  139.                    JE   Boost
  140.                    CMP  BX,114h ;800x600x64k
  141.                    JE   Boost
  142.                    CMP  BX,10fh ;320x200x16m
  143.                    JE   Boost
  144.                    CMP  BX,137h ;320x240x16m
  145.                    JE   Boost
  146.                    CMP  BX,138h ;320x400x16m
  147.                    JE   Boost
  148.                    CMP  BX,121h ;640x350x16m
  149.                    JE   Boost
  150.                    CMP  BX,122h ;640x400x16m
  151.                    JE   Boost
  152.                    CMP  BX,112h ;640x480x16m
  153.                    JE   Boost
  154.  
  155. LetsGo:
  156.                    JMP  OnlyCall
  157.  
  158. Boost:             ; do my own stack frame ;-) !
  159.  
  160.                    PUSHF
  161.                    PUSH CS
  162.                    PUSH OFFSET Adding
  163.  
  164. OnlyCall:          JMP Save10
  165.  
  166. Adding:            PUSH AX
  167.                    PUSH DX
  168.  
  169.                    MOV  DX,3C4h
  170.                    MOV  AL,0Fh          ; reg 0Fh
  171.                    OUT  DX,AL
  172.                    INC  DL 
  173.                    IN   AL,DX
  174.                    AND  AL,NOT(8+16+32)
  175.                    OR   AL,(6 SHL 3)    ; 32 bits mode + CRT FIFO depth control
  176.                    OUT  DX,AL
  177.  
  178.                    DEC  DL
  179.                    MOV  AL,16h          ; reg 16h
  180.                    OUT  DX,AL
  181.                    INC  DL
  182.                    IN   AL,DX
  183.                    AND  AL,15
  184.                    OR   AL,(0 SHL 4)+(2 SHL 6) ; delay for mem Write/I-O
  185.                    OUT  DX,AL
  186.  
  187.                    POP   DX
  188.                    POP   AX 
  189.          
  190.                    IRET
  191.  
  192. NewInt10           ENDP
  193.  
  194. EndOfResident:
  195.  
  196. ; Hey this looks like some Sam'code ;-) !!!!
  197.  
  198. Copyright          DB "Cirrus 542x Booster! Coded by Type One 1995 - $" 
  199. Install            DB "INSTALLED",10,13,"$"
  200. Remove             DB "REMOVED",10,13,"$"
  201.  
  202. installation:      MOV AX,CS 
  203.                    MOV DS,AX
  204.                    Print Copyright
  205.                    MOV AX,3510h ; routine déjà en mem ?
  206.                    INT 21h
  207.                    CMP WORD PTR ES:[BX-2],"!B"
  208.                    JNE PutInMem ; non
  209.                    Print Remove
  210.                    MOV AX,ES:Int10Seg ; ES % au prg en mem
  211.                    MOV DS,AX
  212.                    MOV AX,2510h
  213.                    MOV DX,ES:Int10Ofs
  214.                    INT 21h ; restaure ancien gestionnaire
  215.                    MOV BX,ES
  216.                    MOV ES,ES:[2Ch]
  217.                    MOV AH,49h
  218.                    INT 21h ; libère l'environnement
  219.                    MOV ES,BX
  220.                    MOV AH,49h
  221.                    INT 21h ; libère le prog
  222.                    MOV AX,4C00h
  223.                    INT 21h ; fin
  224.  
  225. PutInMem:          Print Install
  226.                    MOV Int10Ofs,BX ; sauve l'ancien gestionnaire
  227.                    MOV Int10Seg,ES
  228.                    MOV AX,2510h 
  229.                    MOV DX,OFFSET NewInt10
  230.                    INT 21h ; met mon gestionnaire en place
  231.                    MOV DX,EndOfResident-Start+100h+15 ; = l'age du capitaine
  232.                    MOV CL,4
  233.                    SHR DX,CL
  234.                    XOR AL,AL
  235.                    MOV AH,31h
  236.                    INT 21h ; fin et rester résident
  237.  
  238. Int10              ENDS
  239.                    END Start
  240.